<?php
/**
 * 更新会员积分 (处理兑换过后的)
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	user
 */
if (is_object($objWebInit) && !empty($_SESSION['user_id'])) {
	if(!isset($objuser)){
		include_once(__WEB_ROOT."/user/class/user.class.php");
		include_once(__WEB_ROOT."/user/config/var.inc.php");
		$objuser = new user();
		$objuser->arrGPdoDB = $arrGPdoDB;
		$objuser->db();
	}

	if(!empty($intBonus)){//为空不作处理	
		$objuser->tablename2= $arrGWeb['db_tablepre'].'user';

		$arrInfo=current($objuser->getUser($_SESSION['user_id']));
		$arrInfo['user_bonus'] = $arrInfo['user_bonus']-$intBonus;
		
		$_SESSION['user_bonus'] = $arrInfo['user_bonus'];//更新session
		$objuser->saveInfo($arrInfo,1,false);
	}
}
?>